<template>
  <div>
    <div>
      <div v-for="x in data" :key="x.id">
        <div>
          {{ x.TEXT }}
        </div>
        <el-divider />
      </div>
      <div v-if="data.length==0">
        <span>这个问题还没有回复，快去回复吧</span>
      </div>
    </div>
    <WrapPagination>
      <el-pagination
        v-if="data.length"
        class="pagination"
        :current-page="table.page"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="table.size"
        layout="prev, pager, next"
        :total="table.total"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </WrapPagination>
  </div>
</template>

<script>
import { TableMixin } from '../../components/mixin'
import { getList } from '../../api/employee'

export default {
  mixins: [TableMixin],
  props: {
    data: {
      type: [Array],
      required: true
    }
  },
  data() {
    return {
      search: ''
    }
  },
  mounted() {
    // this.getList()
  },
  methods: {
    getList() {
      this.wrapResourceList(getList, {
        search: this.search
      })
    },
    handleSearch() {
      this.getList()
    }
  }
}
</script>
